package com.company.app.dao;

import java.util.List;

import org.springframework.dao.DataAccessException;

import com.company.app.entities.Customer;
import com.google.code.ssm.api.BridgeMethodMapping;
import com.google.code.ssm.api.BridgeMethodMappings;


/**
 * The Interface CompanyDAO.
 */
@BridgeMethodMappings(value={	
		@BridgeMethodMapping(methodName="searchEntityByFilter", erasedParamTypes = {Customer.class }, targetParamTypes = { Customer.class }) ,
		@BridgeMethodMapping(methodName="insertEntity", erasedParamTypes = {Customer.class }, targetParamTypes = { Customer.class }),
		@BridgeMethodMapping(methodName="updateEntity", erasedParamTypes = {Customer.class }, targetParamTypes = { Customer.class }),
		@BridgeMethodMapping(methodName="deleteEntity", erasedParamTypes = {Customer.class }, targetParamTypes = { Customer.class })
		})
public interface CustomerDAO extends BaseInterfaceDAO<Customer> {
	
	public static final String MEMCHACHED_NAMESPACE="com/company/app/dao/Customer";
	
	/**
	 * Gets the client by email.
	 *
	 * @param email the email
	 * @return the client by email
	 * @throws DataAccessException the data access exception
	 */
	public Customer getCustomerByEmail(String email) throws DataAccessException;
	
	/**
	 * Gets the customer by specific logic.
	 *
	 * @return the customer by specific logic
	 * @throws DataAccessException the data access exception
	 */
	public Customer getCustomerBySpecificLogic()  throws DataAccessException;
	
	/* (non-Javadoc)
	 * 	THIS OVERRIDE IS REQUIRED BEACAUSE MEMCACHED  RESOLVE THE CLASS OBJECT INSTEAD OF THE CUSTOMER
	 *  FIX NEEDED TO MAKE MEMCACHED WORK PROPERLY
	 * @see com.company.app.dao.BaseInterfaceDAO#searchEntities(java.util.List)
	 */
	@Override
	public List<Customer> searchEntities(List<Customer> filter);
	
	/* (non-Javadoc)
	 * @see com.company.app.dao.BaseInterfaceDAO#createEntity(java.lang.Object)
	 */
	@Override
	public Customer createEntity(Customer entity);
	
	/* (non-Javadoc)
	 * @see com.company.app.dao.BaseInterfaceDAO#updateEntity(java.lang.Object)
	 */
	@Override
	public Customer updateEntity(Customer entity);
	
	/* (non-Javadoc)
	 * @see com.company.app.dao.BaseInterfaceDAO#deleteEntity(java.lang.Object)
	 */
	@Override
	public Customer deleteEntity(Customer entity);

}
